package com.hezhiqin.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: hezhiqin
 * @time: 2020/7/14 16:25
 */
@Component
public class DemoPublisher {

    private ApplicationContext applicationContext;

    @Autowired
    public void setApplicationContext(ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }

    public void publish() {
        applicationContext.publishEvent(new DynamicMqttClient("user_1","4118","tcp://mqtt.zillion-ioe.com:1883","75dcd3771ae84c29a5b4579daab2de82","/RealData/20064/#",3000));
    }
}
